package com.pro.common.api.enums;

import com.pro.common.api.CommonConst;
import com.pro.framework.api.enums.IEnumStr;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * 系统角色
 */
@Getter
@AllArgsConstructor
public enum EnumSysRole implements IEnumStr {
    ANONYMOUS("匿名", 1, CommonConst.Bean.userService),
    USER("用户", 2, CommonConst.Bean.userService),
    AGENT("代理", 3, CommonConst.Bean.agentService),
    ADMIN("管理员", 4, CommonConst.Bean.adminService),
//    superAdmin("超级管理员", 5),
    ;

    final String label;
    final Integer id;
    final String serviceBean;
    public static final Map<String, EnumSysRole> MAP = IEnumStr.getMap(values());
    public static final Set<EnumSysRole> ADMIN_OR_AGENT = Set.of(ADMIN, AGENT);
}
